package test_interface

import "fmt"

type Phone interface {
	call()
}

type NPhone struct {
}

func (nphone NPhone) call() {
	fmt.Println("i am nphone")
}

type IPhone struct {
}

func (iphone IPhone) call() {
	fmt.Println("i am iphone")
}

func DoInterface() {
	var phone Phone

	phone = new(NPhone)
	phone.call()

	phone = new(IPhone)
	phone.call()
}
